package com.cosmo.prototype.demo01;

public class WuKong implements Cloneable {

    private String name;

    private Stick stick;


    WuKong() {
        System.out.println("具体原型创建成功！");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Stick getStick() {
        return stick;
    }

    public void setStick(Stick stick) {
        this.stick = stick;
    }

    public WuKong clone() throws CloneNotSupportedException {
        System.out.println("具体原型复制成功！");
        return (WuKong) super.clone();
    }
}
